<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>分页普通用法</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
</head>
<body>
    <script src="../layui/layui.js"></script>

    <!-- 定义两个div单元即可 后续通过分页组件进行id绑定 -->
    <div id="demo-laypage-normal-1"></div>
    <div id="demo-laypage-normal-2"></div>

    <script>
        layui.use(function(){
            // layui提供了多个组件 对象var出来
            var laypage = layui.laypage;
            // 分页对象通过render处理分页
            laypage.render({
                elem: 'demo-laypage-normal-1',
                count: 50 // 数据总数
            });
            laypage.render({
                elem: 'demo-laypage-normal-2',
                count: 100 // 数据总数
            });
        });
    </script>
</body>
</html>